//
//  GameCenterLogin.h
//  GameProject
//
//  Created by Blair Trusler on 24/11/2011.
//  Copyright (c) 2011 Blair Trusler. All rights reserved.
//

#import "GameHeader.h"

#define kAchievement1 @"com.blairtrusler.finalyearproject.achievement1"
#define kAchievement2 @"com.blairtrusler.finalyearproject.achievement2"
#define kAchievement3 @"com.blairtrusler.finalyearproject.achievement3"
#define kAchievement4 @"com.blairtrusler.finalyearproject.achievement4_level13stars"
#define kAchievement5 @"com.blairtrusler.finalyearproject.achievement5_level23stars"
#define kAchievement6 @"com.blairtrusler.finalyearproject.achievement6_level33stars"
#define kAchievement7 @"com.blairtrusler.finalyearproject.achievement7_gameover"
#define kAchievement8 @"com.blairtrusler.finalyearproject.achievement8_credits"
#define kAchievement9 @"com.blairtrusler.finalyearproject.achievement9_caught"
#define kAchievement10 @"com.blairtrusler.finalyearproject.achievement10_"    //menu

#define kLeaderboard1 @"com.blairtrusler.finalyearproject.leaderboard.1"
#define kLeaderboard2 @"com.blairtrusler.finalyearproject.leaderboard.2"
#define kLeaderboard3 @"com.blairtrusler.finalyearproject.leaderboard.3"
#define kLeaderboard4 @"com.blairtrusler.finalyearproject.leaderboard.4"
#define kLeaderboard5 @"com.blairtrusler.finalyearproject.leaderboard.5"

@interface GameCenterLogin : NSObject <NSCoding>{
    BOOL gameCenterAvailable;
    BOOL userAuthenticated;
    
    NSMutableArray *scoresToReport;
    NSMutableArray *achievementsToReport;
    
//    NSMutableDictionary *achievementsDescDictionary;
}

+(GameCenterLogin *)sharedInstance;
-(void)authenticationChanged;
-(void)authenticateLocalUser;

-(void)save;
-(id)initWithScoresToReport:(NSMutableArray *)scoresToReport achievementsToReport:(NSMutableArray *)achievementsToReport;

-(void)reportScore:(NSString *)identifier score:(int)rawScore;
-(void)reportAchievement:(NSString *)identifier percentComplete:(double)percentComplete;

-(void)resendData;

@property (retain) NSMutableArray *scoresToReport;
@property (retain) NSMutableArray *achievementsToReport;

@end
